package com.beibei.core.data.service.impl;

import java.util.List;

import com.beibei.core.data.bean.DataDictionary;
import com.beibei.core.data.dao.IDataDictionaryDao;
import com.beibei.core.data.service.IDataDictionaryService;
import com.beibei.framework.service.impl.BaseServiceImpl;

/**
 * 数据字典服务类
 * 
 * @author 309814490@qq.com
 * @since 2014-02-12
 */
public class DataDictionaryServiceImpl extends BaseServiceImpl implements
		IDataDictionaryService {
	private IDataDictionaryDao dataDictionaryDao;

	/**
	 * 保存数据字典大类
	 * 
	 * @param dictionary
	 * @return
	 */
	public boolean saveDataDictionary(DataDictionary dictionary) {
		return dataDictionaryDao.saveDataDictionary(dictionary);
	}

	/**
	 * 修改数据字典大类
	 * 
	 * @param dictionary
	 * @return
	 */
	public boolean updateDataDictionary(DataDictionary dictionary) {
		return dataDictionaryDao.updateDataDictionary(dictionary);
	}

	/**
	 * 根据ID查询数据字典大类
	 * 
	 * @param dictionary
	 * @return
	 */
	public DataDictionary getDataDictionaryById(String id) {
		return dataDictionaryDao.getDataDictionaryById(id);
	}

	/**
	 * 根据条件分页查询数据字典大类
	 * 
	 * @param dictionary
	 * @return
	 */
	public List<DataDictionary> getDataDictionaryForPager(
			DataDictionary dictionary, int currentPage, int pageSize) {
		return dataDictionaryDao.getDataDictionaryForPager(dictionary,
				currentPage, pageSize);
	}

	/**
	 * 保存数据字典小类
	 * 
	 * @param dictionary
	 * @return
	 */
	public boolean saveDataDetail(DataDictionary dictionary) {
		return dataDictionaryDao.saveDataDetail(dictionary);
	}

	/**
	 * 修改数据字典小类
	 * 
	 * @param dictionary
	 * @return
	 */
	public boolean updateDataDetail(DataDictionary dictionary) {
		return dataDictionaryDao.updateDataDetail(dictionary);
	}

	/**
	 * 根据ID查询数据字典小类
	 * 
	 * @param dictionary
	 * @return
	 */
	public DataDictionary getDataDetailById(String id) {
		return dataDictionaryDao.getDataDetailById(id);
	}

	/**
	 * 根据条件分页查询数据字典小类
	 * 
	 * @param dictionary
	 * @return
	 */
	public List<DataDictionary> getDataDetailForPager(
			DataDictionary dictionary, int currentPage, int pageSize) {
		return dataDictionaryDao.getDataDetailForPager(dictionary, currentPage,
				pageSize);
	}

	public IDataDictionaryDao getDataDictionaryDao() {
		return dataDictionaryDao;
	}

	public void setDataDictionaryDao(IDataDictionaryDao dataDictionaryDao) {
		this.dataDictionaryDao = dataDictionaryDao;
	}

}
